package ModelLayer;

/**
 * Class to hold info about a copy of a DVD
 * 
 * @author (Jan Skrubbeltrang) 
 * @version (a version number or a date)
 */
public class Copy
{
    // instance variables
    private DVD dvd;
    private int serial;
    private String dateOfPurchase;
    private double price;
    
    /**
     * Constructor for objects of class Copy
     * 
     */
    public Copy()
    {
        // initialise instance variables
        dvd = null;
        serial = 0;
        dateOfPurchase = "";
        price = 0.0;
    }
    
    /**
     * Constructor for objects of the class Copy
     * 
     * @Param dvd - DVD object, serial - int, dop - String for dateOfPurxchase, price - double
     */
    public Copy(DVD dvd, int serial, String dop, double price)
    {
        // initialise instance variables
        this.dvd = dvd;
        this.serial = serial;
        this.dateOfPurchase = dop;
        this.price = price;
    }
    
    /**
     * Accessor for serial
     * 
     * @return int - serial
     */
    public int getSerial()
    {
        return serial;
    }
    
    /**
     * Accessor for dateOfPurchase
     * 
     * @return String - Date of purchase
     */
    public String getDateOfPurchase()
    {
        return dateOfPurchase;
    }
    
    /**
     * Accessor for price
     * 
     * @return double - Aquisition price
     */
    public double getPrice()
    {
        return price;
    }
    
    /**
     * Mutator for serial
     * 
     * @param int - serial 
     */
    public void setSerial(int newSerial)
    {
        serial = newSerial;
    }
    
    /**
     * Mutator for dateOfPurchase
     * 
     * @param String - Date of purchase
     */
    public void setDateOfPurchase(String newDOP)
    {
        dateOfPurchase = newDOP;
    }
    
    /**
     * Mutator for price
     * 
     * @param double - Aquisition price
     */
    public void setPrice(double newPrice)
    {
        price = newPrice;
    }
    
    /**
     * Accessor for dvd
     * 
     * @return DVD object
     */
    public DVD getDVD()
    {
        return dvd;
    }
}
